//
//  MenuCell.swift
//  onemeetingmac
//
//  Created by 张衡 on 2020/3/16.
//  Copyright © 2020 onemeeting. All rights reserved.
//

import Foundation

class MenuCell: TableRowView {
    
    static let identifier  = NSUserInterfaceItemIdentifier.init("MenuCell")
    
    
    override init(frame frameRect: NSRect) {
        super.init(frame: frameRect)
        self.setupUI()
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    func setupUI()  {
        
        self.addSubview(selectImageV)
        selectImageV.snp.makeConstraints { (make) in
            make.width.height.equalTo(12)
            make.left.equalTo(2)
            make.centerY.equalToSuperview()
        }
        
        self.addSubview(title)
        title.snp.makeConstraints { (make) in
            make.width.equalToSuperview()
            make.height.equalTo(20)
            make.center.equalToSuperview()
        }
        
        self.addSubview(lineView)
        lineView.snp.makeConstraints { (make) in
            make.height.equalTo(1)
            make.bottom.centerX.width.equalToSuperview()
        }
    }
    
    lazy var lineView: NSView = {
        let view = NSView()
        view.wantsLayer = true
        view.layer?.backgroundColor = color_gray(200).cgColor
        return view
    }()
    
    lazy var title: NSLabel = {
        let lab = NSLabel.label(title: "标题", textColor: NSColor.black, font: NSFont.systemFont(ofSize: 14))
        return lab
    }()
    
    lazy var selectImageV: NSImageView = {
        let imageV = NSImageView.init(image: NSImage.image(name:"icon_meeting_checkmark_blue")!)
        return imageV
    }()
    
    
    
}
